<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>弹性布局-项目属性</title>
    <style>
        .container{
            width: 600px;
            height: 400px;
            background: pink;
            border: 1px solid #000;
            margin: 0 auto;
            /* flex */

            display: flex;
        }
        .box{
            color: #FFF;
            text-align: center;
            height: 100px;
            font-size: 40px;
        }
        .box1{
            width: 300px;
            background: greenyellow;
            /* order调节顺序 */
            /* order: 3; */
        }
        .box2{
            width: 200px;
            background: skyblue;
            /* order: 2; */

            /* 放大 */
            /* 将剩余空间分为3+1 =4份，box2占据3份 */
            /* flex-grow: 3; */

            /* 缩小比例 */
            /* 宽度超出300  */
            /* 200px*flex-sjrink:2  =>  4   1*/
            /* 400px*flex-sjrink:3  =>  12   3*/
            /* 1:3的关系 ；300*1/4 75   *3/4=225 */
            /* box2缩小75px,box3缩小225px */
            flex-shrink: 2;
        }
        .box3{
            width: 400px;
            background: orange;
            /* order: 1; */
            /* flex-grow: 1; */
            
            flex-shrink: 3;

        }
    </style>
</head>

<body>
    <div class="container">
        <div class="box box1">1</div>
        <div class="box box2">2</div>
        <div class="box box3">3</div>
    </div>
</body>

</html>